package com.wealth.system.vo;

import java.util.List;

/**
 * 菜单树
 * @author chan
 * create by chan on 2016-09-01
 */
public class Tree implements java.io.Serializable ,Comparable<Tree>{
	
	private static final long serialVersionUID = -5235482117554786124L;
	
	private Long id;
	private String name;
	private String url;
	private String state = "open";// open,closed
	private List<Tree> children;
	private Long pid;
	private Integer seq;
	
	private String menuParent; 	//FIXME 丑陋实现，之后需要修改 
	private String menuChild; 
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public List<Tree> getChildren() {
		return children;
	}
	public void setChildren(List<Tree> children) {
		this.children = children;
	}
	public Long getPid() {
		return pid;
	}
	public void setPid(Long pid) {
		this.pid = pid;
	}
	
	public Integer getSeq() {
		return seq;
	}
	public void setSeq(Integer seq) {
		this.seq = seq;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getMenuParent() {
		return menuParent;
	}
	public void setMenuParent(String menuParent) {
		this.menuParent = menuParent;
	}
	public String getMenuChild() {
		return menuChild;
	}
	public void setMenuChild(String menuChild) {
		this.menuChild = menuChild;
	}
	
	@Override
	public int compareTo(Tree other) {
		if(this.seq<other.seq) return -1;
		else if(this.seq==other.seq) return 0;
		else return 1; 
	}
}
